package com.supernumbers;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Operacion {

	private static Pattern pattern = Pattern.compile("((\\d*\\.\\d+)|(\\d+)|([\\+\\-\\*/\\(\\)_=]))");
	private String operacion;
	private String[] modulos;
	
	public Operacion(String operacion){
		this.operacion = operacion;
		
		Matcher m = pattern.matcher(operacion);
		
		modulos = new String[m.groupCount()+1];
		
		for(int i=0;m.find();i++){
			modulos[i] = m.group();
		}
	}

	public String getOperacion() {
		return operacion;
	}

	public String[] getModulos() {
		return modulos;
	}
	
	

}
